﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace TestSystem.Controllers
{
    [Authorize]
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            if (User.IsInRole("Administrator"))
                return RedirectToAction("Index", "Administrator");
            else if (User.IsInRole("Candidate"))
                return RedirectToAction("Index", "Administrator");
            else if (User.IsInRole("Checker"))
                return RedirectToAction("Index", "Administrator");
            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
